﻿Ext.ns('Microblogging');
Microblogging.Viewport = Ext.extend(Ext.Panel, {
			id : 'viewport',
			layout : 'card',
			fullscreen : true,
			application : this,
			initComponent : function() {
				var app = this.application;
				app.views = app.views || {};
				var views = app.views;
				this.items = views.items || this.items || [];
				Microblogging.Viewport.superclass.initComponent.apply(this,
						arguments);
				// 将生成后的组件重新赋值给views
				views.items = this.items.items;
				for (var i = 0; i < views.items.length; i++) {
					views.map[views.keys[i]] = views.items[i];
				} 
			},
			addView : function() {
				return this.application.addView.apply(this.application,
						arguments);
			}
		});